<div class="panel panel-default panel-intro">
    <div class="panel-heading">
        <h3 class="panel-title">质量检查详情</h3>
    </div>
    <div class="panel-body">
        <div class="row">
            <div class="col-md-6">
                <table class="table table-bordered">
                    <tr>
                        <th width="120">质检单号</th>
                        <td>{$row.quality_no}</td>
                    </tr>
                    <tr>
                        <th>生产计划</th>
                        <td>{$row.plan.plan_name}</td>
                    </tr>
                    <tr>
                        <th>订单编号</th>
                        <td>{$row.plan.order.order_no}</td>
                    </tr>
                    <tr>
                        <th>产品名称</th>
                        <td>{$row.productModel.product.name}</td>
                    </tr>
                    <tr>
                        <th>产品型号</th>
                        <td>{$row.productModel.name}</td>
                    </tr>
                </table>
            </div>
            <div class="col-md-6">
                <table class="table table-bordered">
                    <tr>
                        <th width="120">检查工序</th>
                        <td>{$row.process.name}</td>
                    </tr>
                    <tr>
                        <th>检查数量</th>
                        <td>{$row.check_quantity}</td>
                    </tr>
                    <tr>
                        <th>合格数量</th>
                        <td>{$row.pass_quantity}</td>
                    </tr>
                    <tr>
                        <th>不合格数量</th>
                        <td>{$row.fail_quantity}</td>
                    </tr>
                    <tr>
                        <th>合格率</th>
                        <td>{$row.pass_rate}%</td>
                    </tr>
                </table>
            </div>
        </div>
        
        <div class="row">
            <div class="col-md-12">
                <table class="table table-bordered">
                    <tr>
                        <th width="120">检查结果</th>
                        <td>
                            {if $row.check_result == 'pass'}
                                <span class="label label-success">合格</span>
                            {elseif $row.check_result == 'fail'}
                                <span class="label label-danger">不合格</span>
                            {elseif $row.check_result == 'pending'}
                                <span class="label label-warning">待检查</span>
                            {/if}
                        </td>
                    </tr>
                    <tr>
                        <th>检查员</th>
                        <td>{$row.checker.username}</td>
                    </tr>
                    <tr>
                        <th>检查时间</th>
                        <td>{$row.check_time|datetime}</td>
                    </tr>
                    <tr>
                        <th>创建时间</th>
                        <td>{$row.createtime|datetime}</td>
                    </tr>
                </table>
            </div>
        </div>
        
        {if $row.check_standard}
        <div class="row">
            <div class="col-md-12">
                <h4>检查标准</h4>
                <p>{$row.check_standard}</p>
            </div>
        </div>
        {/if}
        
        {if $row.remark}
        <div class="row">
            <div class="col-md-12">
                <h4>备注</h4>
                <p>{$row.remark}</p>
            </div>
        </div>
        {/if}
    </div>
</div>
